﻿using System.Collections.Generic;
using System;
using System.Data;
using System.Configuration;
using System.Collections;
using System.Web;
using System.Web.Security;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;
using System.Web.UI.HtmlControls;
namespace Dislocations2.App_Code
{
    public class Dislocation
    {
        public int ID { get; set; }
        public int DateOp { get; set; }
        public int TimeOp { get; set; }
        public int Station { get; set; }
        public int Road1 { get; set; }
        public int Road2 { get; set; }
        public int IndexOfTr { get; set; }
        public int Numb { get; set; }

        public Dislocation(int id, int dateOp, int timeOp, int station, int road1, int road2, int indexOfTr, int numb)
        {
            ID = id;
            DateOp = dateOp;
            TimeOp = timeOp;
            Station = station;
            Road1 = road1;
            Road2 = road2;
            IndexOfTr = indexOfTr;
            Numb = numb;
        }
    }

    public class Disl
    {
        public DataTable LoadData()
        {
            List<Dislocation> list = new List<Dislocation>();

            list.Add(new Dislocation(1, 2, 3, 4, 5, 6, 7, 8));
            list.Add(new Dislocation(9, 10, 11, 12, 13, 14, 15, 16));
            list.Add(new Dislocation(17, 18, 19, 20, 21, 22, 23, 24));
            list.Add(new Dislocation(25, 26, 27, 28, 29, 30, 31, 32));
            list.Add(new Dislocation(33, 34, 35, 36, 37, 38, 39, 40));
            list.Add(new Dislocation(41, 42, 43, 44, 45, 46, 47, 48));
            list.Add(new Dislocation(49, 50, 51, 52, 53, 54, 55, 56));
            list.Add(new Dislocation(57, 58, 59, 60, 61, 62, 63, 64));
            list.Add(new Dislocation(65, 66, 67, 68, 69, 70, 71, 72));
            list.Add(new Dislocation(73, 74, 75, 76, 77, 78, 79, 80));
            list.Add(new Dislocation(81, 82, 83, 84, 85, 86, 87, 88));
            list.Add(new Dislocation(89, 90, 91, 92, 93, 94, 95, 96));
            list.Add(new Dislocation(97, 98, 99, 100, 101, 102, 103, 104));
            list.Add(new Dislocation(105, 106, 107, 108, 109, 110, 111, 112));
            list.Add(new Dislocation(113, 114, 115, 116, 117, 118, 119, 120));
            list.Add(new Dislocation(121, 122, 123, 124, 125, 126, 127, 128));
            list.Add(new Dislocation(129, 130, 131, 132, 133, 134, 135, 136));
            list.Add(new Dislocation(137, 138, 139, 140, 141, 142, 143, 144));
            list.Add(new Dislocation(145, 146, 147, 148, 149, 150, 151, 152));
            list.Add(new Dislocation(153, 154, 155, 156, 157, 158, 159, 160));
            list.Add(new Dislocation(161, 162, 163, 164, 165, 166, 167, 168));
            list.Add(new Dislocation(169, 170, 171, 172, 173, 174, 175, 176));
            list.Add(new Dislocation(177, 178, 179, 180, 181, 182, 183, 184));
            list.Add(new Dislocation(185, 186, 187, 188, 189, 190, 191, 192));
            DataTable dt = new DataTable();


            dt.Columns.Add("Код операции");
            dt.Columns.Add("Дата операции");
            dt.Columns.Add("Время операции");
            dt.Columns.Add("Станция сверш. операции");
            dt.Columns.Add("Дорога сдачи");
            dt.Columns.Add("Дорога приема");
            dt.Columns.Add("Индекс поезда");
            dt.Columns.Add("Номер поезда");

            for (int i = 0; i < 24; i++)
            {
                dt.Rows.Add(list[i].ID, list[i].DateOp, list[i].TimeOp, list[i].Station, list[i].Road1, list[i].Road2, list[i].IndexOfTr, list[i].Numb);
            }
            return dt;
        }

    }
}